How a Virus Invades: Program Viruses A program virus attaches itself to a legitimate program file. When the program is run, the virus intercepts the programÕs execution and takes control of the computer system.